namespace Digitalmes.Domain.Entities.Mes.Masters;

/// <summary>
/// 工站。
/// </summary>
[SugarTable("md_workstation")]
public sealed class MdWorkstation : AuditedEntity, ISoftDelete
{
    /// <summary>
    /// 工站编号
    /// </summary>
    [NotNull]
    public string? WsCode { get; set; }

    /// <summary>
    /// 工站名称
    /// </summary>
    [NotNull]
    public string? WsName { get; set; }

    /// <summary>
    /// 所属产线 Id
    /// </summary>
    public long LineId { get; set; }

    /// <summary>
    /// 所属产线
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(LineId))]
    public MdLine? Line { get; set; }

    /// <summary>
    /// 工位类型。（作业、上件口、下件口、NG口、返工）
    /// </summary>
    [SugarColumn(SqlParameterDbType = typeof(EnumToStringConvert))]
    public WorkstationTypeEnum WsType { get; set; }

    /// <summary>
    /// 排序
    public int Order { get; set; }

    /// <summary>
    /// 启用状态（0->停用，1->启用）
    /// </summary>
    public EnabledStatusEnum Status { get; set; }

    public bool IsDeleted { get; set; }
}
